package util;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class price {
    public static double getFirst(double weight){
        return 1.00;
    }
    public static double getSecond(double weight){
        if (weight-1 >0 && weight-3<=0){

            return weight-1;
        }else if (weight>3)return 2.00;
        else return 0.0;

    }
    public static double getend(double weight){

        if (weight-3>0){
            return weight-3;
        }else
        return 0.0;
    }

    public static void main(String[] args) {
//        System.out.println(getFirst(2.875));
        System.out.println(getSecond(2.85));
//        System.out.println(getend(2.875));

    }

}
